import { createPinia } from 'pinia'
import persist from 'pinia-plugin-persistedstate'
import { useUserStore } from './modules/userStore'
import { useCollapseStore } from './modules/collapseStore'
import { useRoutesStore } from './modules/routesStore'

// 创建 pinia 实例
const pinia = createPinia()
// 使用持久化存储插件
pinia.use(persist)

// 默认导出，给 main.ts 使用
export default pinia

export { useUserStore, useCollapseStore, useRoutesStore }